﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Profile.aspx.vb" Inherits="travel.Profile" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
        <h1>Profile</h1>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
    DataKeyNames="ID" DataSourceID="SqlDataSource1">
        <Columns>
            <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
                ReadOnly="True" SortExpression="ID" />
            <asp:BoundField DataField="FirstName" HeaderText="FirstName" 
                SortExpression="FirstName" />
            <asp:BoundField DataField="Description" HeaderText="Description" 
                SortExpression="Description" />
            <asp:BoundField DataField="LastName" HeaderText="LastName" 
                SortExpression="LastName" />
            <asp:BoundField DataField="TravellerName" HeaderText="TravellerName" 
                SortExpression="TravellerName" />
            <asp:ImageField DataImageUrlField="Picture" DataImageUrlFormatString="{0}">
            </asp:ImageField>
        </Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:travelConnectionString %>" 
    ProviderName="<%$ ConnectionStrings:travelConnectionString.ProviderName %>" 
    SelectCommand="SELECT [ID], [FirstName], [Description], [LastName], [Picture], [TravellerName] FROM [Profile] WHERE ([TravellerName] = ?)">
    <SelectParameters>
        <asp:QueryStringParameter Name="TravellerName" QueryStringField="TravellerName" 
            Type="String" />
    </SelectParameters>
</asp:SqlDataSource>
    <asp:Button ID="btn_EditProfile" runat="server" Text="Edit Profile" 
        PostBackUrl="~/editProfile.aspx" />
    </p>
    <p>
    </p>
</asp:Content>
